#ifndef FND_TILE_IMAGE_HPP
#define FND_TILE_IMAGE_HPP
//#include <pantheios/pantheios.hpp>
#include "ResourceManager.hpp"
#include <boost/noncopyable.hpp>
#include <sfml/graphics.hpp>
namespace FndGame2D {
  class tile_image : boost::noncopyable {
  public:
    typedef tile_image class_type ;
    typedef Manager<std::string, sf::IntRect> source_class ;
    source_class m_rects ;
    explicit tile_image(const std::string& image_name = std::string())
      :m_image_name(image_name)
    {}
    const std::string& image_name() const {return m_image_name;}
    bool add_rect(const std::string& key, const sf::IntRect& rect) {
      return m_rects.add_value(key, rect) ;
    }
    const sf::IntRect& get_rect(const std::string& key) const {
      return m_rects.get_value(key) ;
    }
    bool has_rect(const std::string& key) const {
      return m_rects.has_value(key) ;
    }
    bool remove_rect(const std::string& key) {
      return m_rects.remove_value(key) ;
    }
    bool read_rects_from_file(const char* file_name) ;
  private:
    std::string m_image_name ;
  } ;
}
#endif
